package com.dustedpixels.jasmin.memory.impl;

import com.dustedpixels.jasmin.memory.Memory16x8;
import com.dustedpixels.jasmin.memory.implbase.Memory16x8ImplBase;

/**
 * 64Kb Random Access Memory.
 */
public final class ROM16x8 extends Memory16x8ImplBase {
    private final Memory16x8 ram;
    
    public static ROM16x8 create(Memory16x8 ram) {
        return new ROM16x8(ram);
    }
    
    ROM16x8(Memory16x8 ram) {
        this.ram = ram;
    }
    
    public byte peek(short address) {
        return ram.peek(address);
    }

    public void poke(short address, byte value) {
        // No-op
    }

    public byte fastPeek(short address) {
        return ram.fastPeek(address);
    }

    public void fastPoke(short address, byte data) {
        // No-op
    }

    public short getAddressMask() {
        return ram.getAddressMask();
    }

    public byte getDataMask() {
        return ram.getDataMask();
    }    
}
